//
//  ThirtGViewController.m
//  DaJiHui
//
//  Created by Hao on 2017/6/26.
//  Copyright © 2017年 Hao. All rights reserved.
//

#define DCScreenW    [UIScreen mainScreen].bounds.size.width
#define DCScreenH    [UIScreen mainScreen].bounds.size.height

#import "DCNavTabBarController.h"
#import "OneViewController.h"
#import "TwoViewController.h"
#import "ThreeViewController.h"
#import "FourViewController.h"
#import "FiveViewController.h"
#import "ThirtGViewController.h"

@interface ThirtGViewController ()

@end

@implementation ThirtGViewController

- (void)viewDidAppear:(BOOL)animated
{
    
    if ([[NSUserDefaults standardUserDefaults] objectForKey:@"login"]) {
        OneViewController *one = [[OneViewController alloc]init];
        one.title = @"全部订单";
        TwoViewController *two = [[TwoViewController alloc]init];
        two.title = @"未付款";
        ThreeViewController *three = [[ThreeViewController alloc]init];
        three.title = @"未使用";
        FourViewController *four = [[FourViewController alloc]init];
        four.title = @"退款";
        FiveViewController *five = [[FiveViewController alloc]init];
        five.title = @"待评价";
        
        NSArray *subViewControllers = @[one,two,three,four,five];
        DCNavTabBarController *tabBarVC = [[DCNavTabBarController alloc]initWithSubViewControllers:subViewControllers];
        tabBarVC.view.frame = self.view.bounds;
        
        [self.view addSubview:tabBarVC.view];
        [self addChildViewController:tabBarVC];
        self.navigationController.navigationBar.translucent = NO;
    }
    
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.title = @"我的订单";
   
    

    // Do any additional setup after loading the view.
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
